{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 6,
   "id": "61f8787f-a4e9-491b-b305-ad77ab4a2393",
   "metadata": {},
   "outputs": [],
   "source": [
    "from ultralytics import YOLO"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 1,
   "id": "b83eb872-8eb2-4e39-a4e0-cc24468c88bc",
   "metadata": {},
   "outputs": [
    {
     "ename": "NameError",
     "evalue": "name 'YOLO' is not defined",
     "output_type": "error",
     "traceback": [
      "\u001b[0;31m---------------------------------------------------------------------------\u001b[0m",
      "\u001b[0;31mNameError\u001b[0m                                 Traceback (most recent call last)",
      "Cell \u001b[0;32mIn[1], line 3\u001b[0m\n\u001b[1;32m      1\u001b[0m con_path \u001b[38;5;241m=\u001b[39m \u001b[38;5;124m\"\u001b[39m\u001b[38;5;124m./yoloDatasets/data.yaml\u001b[39m\u001b[38;5;124m\"\u001b[39m\n\u001b[0;32m----> 3\u001b[0m model \u001b[38;5;241m=\u001b[39m YOLO(\u001b[38;5;124m'\u001b[39m\u001b[38;5;124m./Models/yolov8n.yaml\u001b[39m\u001b[38;5;124m'\u001b[39m)\n\u001b[1;32m      5\u001b[0m model \u001b[38;5;241m=\u001b[39m YOLO(\u001b[38;5;124m'\u001b[39m\u001b[38;5;124m./Models/best.pt\u001b[39m\u001b[38;5;124m'\u001b[39m)\n\u001b[1;32m      7\u001b[0m test_path \u001b[38;5;241m=\u001b[39m \u001b[38;5;124m\"\u001b[39m\u001b[38;5;124m./datasets/Oracle/3_Test/Figures/\u001b[39m\u001b[38;5;124m\"\u001b[39m\n",
      "\u001b[0;31mNameError\u001b[0m: name 'YOLO' is not defined"
     ]
    }
   ],
   "source": [
    "con_path = \"./yoloDatasets/data.yaml\"\n",
    "\n",
    "model = YOLO('./Models/yolov8n.yaml')\n",
    "\n",
    "model = YOLO('./Models/best.pt')\n",
    "\n",
    "test_path = \"./datasets/Oracle/3_Test/Figures/\""
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 11,
   "id": "bd8b0ec5-7a73-405b-9336-d6395958a07b",
   "metadata": {},
   "outputs": [],
   "source": [
    "import os\n",
    "imgs = os.listdir(test_path)\n",
    "imgs = [os.path.join(test_path, i) for i in imgs]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 6,
   "id": "00ed4b7c-f37a-4d58-a7e5-fa601fa029e7",
   "metadata": {
    "scrolled": true
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Ultralytics YOLOv8.1.47 🚀 Python-3.11.5 torch-2.1.1+cpu CPU (AMD Ryzen 5 5500U with Radeon Graphics)\n",
      "\u001b[34m\u001b[1mengine/trainer: \u001b[0mtask=detect, mode=train, model=./Models/yolov8n.pt, data=./yoloDatasets/data.yaml, epochs=20, time=None, patience=100, batch=16, imgsz=640, save=True, save_period=-1, cache=False, device=None, workers=8, project=None, name=train16, exist_ok=False, pretrained=True, optimizer=auto, verbose=True, seed=0, deterministic=True, single_cls=False, rect=False, cos_lr=False, close_mosaic=10, resume=False, amp=True, fraction=1.0, profile=False, freeze=None, multi_scale=False, overlap_mask=True, mask_ratio=4, dropout=0.0, val=True, split=val, save_json=False, save_hybrid=False, conf=None, iou=0.7, max_det=300, half=False, dnn=False, plots=True, source=None, vid_stride=1, stream_buffer=False, visualize=False, augment=False, agnostic_nms=False, classes=None, retina_masks=False, embed=None, show=False, save_frames=False, save_txt=False, save_conf=False, save_crop=False, show_labels=True, show_conf=True, show_boxes=True, line_width=None, format=torchscript, keras=False, optimize=False, int8=False, dynamic=False, simplify=False, opset=None, workspace=4, nms=False, lr0=0.01, lrf=0.01, momentum=0.937, weight_decay=0.0005, warmup_epochs=3.0, warmup_momentum=0.8, warmup_bias_lr=0.1, box=7.5, cls=0.5, dfl=1.5, pose=12.0, kobj=1.0, label_smoothing=0.0, nbs=64, hsv_h=0.015, hsv_s=0.7, hsv_v=0.4, degrees=0.0, translate=0.1, scale=0.5, shear=0.0, perspective=0.0, flipud=0.0, fliplr=0.5, bgr=0.0, mosaic=1.0, mixup=0.0, copy_paste=0.0, auto_augment=randaugment, erasing=0.4, crop_fraction=1.0, cfg=None, tracker=botsort.yaml, save_dir=runs/detect/train16\n",
      "Overriding model.yaml nc=80 with nc=1\n",
      "\n",
      "                   from  n    params  module                                       arguments                     \n",
      "  0                  -1  1       464  ultralytics.nn.modules.conv.Conv             [3, 16, 3, 2]                 \n",
      "  1                  -1  1      4672  ultralytics.nn.modules.conv.Conv             [16, 32, 3, 2]                \n",
      "  2                  -1  1      7360  ultralytics.nn.modules.block.C2f             [32, 32, 1, True]             \n",
      "  3                  -1  1     18560  ultralytics.nn.modules.conv.Conv             [32, 64, 3, 2]                \n",
      "  4                  -1  2     49664  ultralytics.nn.modules.block.C2f             [64, 64, 2, True]             \n",
      "  5                  -1  1     73984  ultralytics.nn.modules.conv.Conv             [64, 128, 3, 2]               \n",
      "  6                  -1  2    197632  ultralytics.nn.modules.block.C2f             [128, 128, 2, True]           \n",
      "  7                  -1  1    295424  ultralytics.nn.modules.conv.Conv             [128, 256, 3, 2]              \n",
      "  8                  -1  1    460288  ultralytics.nn.modules.block.C2f             [256, 256, 1, True]           \n",
      "  9                  -1  1    164608  ultralytics.nn.modules.block.SPPF            [256, 256, 5]                 \n",
      " 10                  -1  1         0  torch.nn.modules.upsampling.Upsample         [None, 2, 'nearest']          \n",
      " 11             [-1, 6]  1         0  ultralytics.nn.modules.conv.Concat           [1]                           \n",
      " 12                  -1  1    148224  ultralytics.nn.modules.block.C2f             [384, 128, 1]                 \n",
      " 13                  -1  1         0  torch.nn.modules.upsampling.Upsample         [None, 2, 'nearest']          \n",
      " 14             [-1, 4]  1         0  ultralytics.nn.modules.conv.Concat           [1]                           \n",
      " 15                  -1  1     37248  ultralytics.nn.modules.block.C2f             [192, 64, 1]                  \n",
      " 16                  -1  1     36992  ultralytics.nn.modules.conv.Conv             [64, 64, 3, 2]                \n",
      " 17            [-1, 12]  1         0  ultralytics.nn.modules.conv.Concat           [1]                           \n",
      " 18                  -1  1    123648  ultralytics.nn.modules.block.C2f             [192, 128, 1]                 \n",
      " 19                  -1  1    147712  ultralytics.nn.modules.conv.Conv             [128, 128, 3, 2]              \n",
      " 20             [-1, 9]  1         0  ultralytics.nn.modules.conv.Concat           [1]                           \n",
      " 21                  -1  1    493056  ultralytics.nn.modules.block.C2f             [384, 256, 1]                 \n",
      " 22        [15, 18, 21]  1    751507  ultralytics.nn.modules.head.Detect           [1, [64, 128, 256]]           \n",
      "Model summary: 225 layers, 3011043 parameters, 3011027 gradients, 8.2 GFLOPs\n",
      "\n",
      "Transferred 319/355 items from pretrained weights\n",
      "Freezing layer 'model.22.dfl.conv.weight'\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "\u001b[34m\u001b[1mtrain: \u001b[0mScanning /home/avicii/Mathmatic/dl-ml/CV/yoloDatasets/labels/train.cache.\u001b[0m\n",
      "\u001b[34m\u001b[1mval: \u001b[0mScanning /home/avicii/Mathmatic/dl-ml/CV/yoloDatasets/labels/val.cache... 1\u001b[0m\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Plotting labels to runs/detect/train16/labels.jpg... \n",
      "\u001b[34m\u001b[1moptimizer:\u001b[0m 'optimizer=auto' found, ignoring 'lr0=0.01' and 'momentum=0.937' and determining best 'optimizer', 'lr0' and 'momentum' automatically... \n",
      "\u001b[34m\u001b[1moptimizer:\u001b[0m AdamW(lr=0.002, momentum=0.9) with parameter groups 57 weight(decay=0.0), 64 weight(decay=0.0005), 63 bias(decay=0.0)\n",
      "Image sizes 640 train, 640 val\n",
      "Using 0 dataloader workers\n",
      "Logging results to \u001b[1mruns/detect/train16\u001b[0m\n",
      "Starting training for 20 epochs...\n",
      "\n",
      "      Epoch    GPU_mem   box_loss   cls_loss   dfl_loss  Instances       Size\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "       1/20         0G      1.675      1.678      1.248          0        640: 1\n",
      "                 Class     Images  Instances      Box(P          R      mAP50  m\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "                   all       1825      10308      0.725      0.675      0.726      0.377\n",
      "\n",
      "      Epoch    GPU_mem   box_loss   cls_loss   dfl_loss  Instances       Size\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "       2/20         0G      1.609      1.184      1.224          9        640: 1\n",
      "                 Class     Images  Instances      Box(P          R      mAP50  m\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "                   all       1825      10308      0.732      0.705      0.734      0.373\n",
      "\n",
      "      Epoch    GPU_mem   box_loss   cls_loss   dfl_loss  Instances       Size\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "       3/20         0G      1.603      1.125      1.226         15        640: 1\n",
      "                 Class     Images  Instances      Box(P          R      mAP50  m\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "                   all       1825      10308      0.782      0.721      0.782      0.422\n",
      "\n",
      "      Epoch    GPU_mem   box_loss   cls_loss   dfl_loss  Instances       Size\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "       4/20         0G      1.573      1.066      1.214          4        640: 1\n",
      "                 Class     Images  Instances      Box(P          R      mAP50  m\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "                   all       1825      10308      0.781      0.732      0.807      0.446\n",
      "\n",
      "      Epoch    GPU_mem   box_loss   cls_loss   dfl_loss  Instances       Size\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "       5/20         0G       1.56      1.045      1.198         41        640: 1\n",
      "                 Class     Images  Instances      Box(P          R      mAP50  m\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "                   all       1825      10308      0.777      0.736      0.792      0.429\n",
      "\n",
      "      Epoch    GPU_mem   box_loss   cls_loss   dfl_loss  Instances       Size\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "       6/20         0G      1.534     0.9986      1.191          4        640: 1\n",
      "                 Class     Images  Instances      Box(P          R      mAP50  m\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "                   all       1825      10308      0.807      0.748      0.828      0.477\n",
      "\n",
      "      Epoch    GPU_mem   box_loss   cls_loss   dfl_loss  Instances       Size\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "       7/20         0G      1.514     0.9767      1.184          3        640: 1\n",
      "                 Class     Images  Instances      Box(P          R      mAP50  m"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "                   all       1825      10308      0.803      0.771      0.836      0.475\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "\n",
      "      Epoch    GPU_mem   box_loss   cls_loss   dfl_loss  Instances       Size\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "       8/20         0G      1.502     0.9498      1.173          7        640: 1\n",
      "                 Class     Images  Instances      Box(P          R      mAP50  m"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "                   all       1825      10308      0.813      0.771      0.846      0.482\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "\n",
      "      Epoch    GPU_mem   box_loss   cls_loss   dfl_loss  Instances       Size\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "       9/20         0G      1.494     0.9418      1.172          2        640: 1\n",
      "                 Class     Images  Instances      Box(P          R      mAP50  m"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "                   all       1825      10308      0.814      0.771      0.845      0.503\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "\n",
      "      Epoch    GPU_mem   box_loss   cls_loss   dfl_loss  Instances       Size\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "      10/20         0G      1.466     0.9048      1.154         13        640: 1\n",
      "                 Class     Images  Instances      Box(P          R      mAP50  m"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "                   all       1825      10308      0.818      0.789      0.859      0.505\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Closing dataloader mosaic\n",
      "\n",
      "      Epoch    GPU_mem   box_loss   cls_loss   dfl_loss  Instances       Size\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "      11/20         0G      1.401      0.861      1.152          6        640: 1\n",
      "                 Class     Images  Instances      Box(P          R      mAP50  m"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "                   all       1825      10308      0.834      0.781      0.861      0.513\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "\n",
      "      Epoch    GPU_mem   box_loss   cls_loss   dfl_loss  Instances       Size\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "      12/20         0G       1.39     0.8423       1.15          5        640: 1\n",
      "                 Class     Images  Instances      Box(P          R      mAP50  m"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "                   all       1825      10308      0.819      0.787      0.856      0.497\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "\n",
      "      Epoch    GPU_mem   box_loss   cls_loss   dfl_loss  Instances       Size\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "      13/20         0G      1.366     0.8159      1.141          6        640: 1\n",
      "                 Class     Images  Instances      Box(P          R      mAP50  m"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "                   all       1825      10308      0.833       0.79      0.867      0.514\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "\n",
      "      Epoch    GPU_mem   box_loss   cls_loss   dfl_loss  Instances       Size\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "      14/20         0G      1.365     0.7972      1.134          5        640: 1\n",
      "                 Class     Images  Instances      Box(P          R      mAP50  m"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "                   all       1825      10308      0.837      0.795      0.868       0.51\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "\n",
      "      Epoch    GPU_mem   box_loss   cls_loss   dfl_loss  Instances       Size\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "      15/20         0G       1.35     0.7775      1.121         17        640: 1\n",
      "                 Class     Images  Instances      Box(P          R      mAP50  m"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "                   all       1825      10308      0.836      0.809      0.877      0.535\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "\n",
      "      Epoch    GPU_mem   box_loss   cls_loss   dfl_loss  Instances       Size\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "      16/20         0G      1.339     0.7684      1.122          2        640: 1\n",
      "                 Class     Images  Instances      Box(P          R      mAP50  m"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "                   all       1825      10308      0.834      0.802      0.876      0.524\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "\n",
      "      Epoch    GPU_mem   box_loss   cls_loss   dfl_loss  Instances       Size\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "      17/20         0G      1.316     0.7468      1.111          7        640: 1\n",
      "                 Class     Images  Instances      Box(P          R      mAP50  m"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "                   all       1825      10308      0.844      0.807      0.881      0.541\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "\n",
      "      Epoch    GPU_mem   box_loss   cls_loss   dfl_loss  Instances       Size\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "      18/20         0G      1.309     0.7307      1.105          9        640: 1\n",
      "                 Class     Images  Instances      Box(P          R      mAP50  m"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "                   all       1825      10308      0.844      0.809      0.883      0.527\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "\n",
      "      Epoch    GPU_mem   box_loss   cls_loss   dfl_loss  Instances       Size\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "      19/20         0G      1.301     0.7118        1.1          7        640: 1\n",
      "                 Class     Images  Instances      Box(P          R      mAP50  m"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "                   all       1825      10308      0.854      0.811      0.886      0.543\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "\n",
      "      Epoch    GPU_mem   box_loss   cls_loss   dfl_loss  Instances       Size\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "      20/20         0G      1.284     0.6996      1.095         31        640: 1\n",
      "                 Class     Images  Instances      Box(P          R      mAP50  m"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "                   all       1825      10308      0.836      0.828      0.888      0.546\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "\n",
      "20 epochs completed in 7.818 hours.\n",
      "Optimizer stripped from runs/detect/train16/weights/last.pt, 6.2MB\n",
      "Optimizer stripped from runs/detect/train16/weights/best.pt, 6.2MB\n",
      "\n",
      "Validating runs/detect/train16/weights/best.pt...\n",
      "Ultralytics YOLOv8.1.47 🚀 Python-3.11.5 torch-2.1.1+cpu CPU (AMD Ryzen 5 5500U with Radeon Graphics)\n",
      "Model summary (fused): 168 layers, 3005843 parameters, 0 gradients, 8.1 GFLOPs\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "                 Class     Images  Instances      Box(P          R      mAP50  m\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "                   all       1825      10308      0.836      0.828      0.888      0.546\n",
      "Speed: 1.7ms preprocess, 68.4ms inference, 0.0ms loss, 0.3ms postprocess per image\n",
      "Results saved to \u001b[1mruns/detect/train16\u001b[0m\n"
     ]
    }
   ],
   "source": [
    "results = model.train(data=con_path, epochs=20, imgsz=640)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 7,
   "id": "4f12b712-58f7-448e-8bad-0d89138bf09d",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Ultralytics YOLOv8.1.47 🚀 Python-3.11.5 torch-2.1.1+cpu CPU (AMD Ryzen 5 5500U with Radeon Graphics)\n",
      "Model summary (fused): 168 layers, 3005843 parameters, 0 gradients, 8.1 GFLOPs\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "\u001b[34m\u001b[1mval: \u001b[0mScanning /home/avicii/Mathmatic/dl-ml/CV/yoloDatasets/labels/val.cache... 1\u001b[0m\n",
      "                 Class     Images  Instances      Box(P          R      mAP50  m\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "                   all       1825      10308       0.84      0.825      0.889      0.546\n",
      "Speed: 1.5ms preprocess, 62.0ms inference, 0.0ms loss, 0.3ms postprocess per image\n",
      "Results saved to \u001b[1mruns/detect/train162\u001b[0m\n"
     ]
    }
   ],
   "source": [
    "metrics = model.val()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 42,
   "id": "38dfddae-9e20-44bb-88b7-23421ff3de7a",
   "metadata": {
    "scrolled": true
   },
   "outputs": [],
   "source": [
    "\n",
    "def getBoxes(imgs):\n",
    "    dict = {}\n",
    "    Boxes = []\n",
    "    for i in imgs:\n",
    "        base_name = os.path.basename(i)\n",
    "        result = model(i)[0]\n",
    "        boxes = result.boxes  # Boxes object for bounding box outputs\n",
    "        masks = result.masks  # Masks object for segmentation masks outputs\n",
    "        keypoints = result.keypoints  # Keypoints object for pose outputs\n",
    "        probs = result.probs  # Probs object for classification outputs\n",
    "        theta = 0.6\n",
    "        Boxes.append(boxes.xyxy[boxes.conf >= theta])\n",
    "        dict[base_name] = boxes.xyxy[boxes.conf >= theta]\n",
    "    return Boxes,dict"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 43,
   "id": "d6aa7bd3-2b79-46e9-9410-a94d740c97a3",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "\n",
      "image 1/1 /home/avicii/Mathmatic/dl-ml/CV/datasets/Oracle/3_Test/Figures/020133.jpg: 640x480 5 oracles, 77.0ms\n",
      "Speed: 2.1ms preprocess, 77.0ms inference, 0.5ms postprocess per image at shape (1, 3, 640, 480)\n",
      "\n",
      "image 1/1 /home/avicii/Mathmatic/dl-ml/CV/datasets/Oracle/3_Test/Figures/020005.jpg: 640x544 1 oracle, 54.0ms\n",
      "Speed: 2.3ms preprocess, 54.0ms inference, 0.5ms postprocess per image at shape (1, 3, 640, 544)\n",
      "\n",
      "image 1/1 /home/avicii/Mathmatic/dl-ml/CV/datasets/Oracle/3_Test/Figures/020037.jpg: 640x640 9 oracles, 79.4ms\n",
      "Speed: 2.6ms preprocess, 79.4ms inference, 0.5ms postprocess per image at shape (1, 3, 640, 640)\n",
      "\n",
      "image 1/1 /home/avicii/Mathmatic/dl-ml/CV/datasets/Oracle/3_Test/Figures/020123.jpg: 640x416 4 oracles, 47.9ms\n",
      "Speed: 1.3ms preprocess, 47.9ms inference, 0.5ms postprocess per image at shape (1, 3, 640, 416)\n",
      "\n",
      "image 1/1 /home/avicii/Mathmatic/dl-ml/CV/datasets/Oracle/3_Test/Figures/020032.jpg: 640x416 10 oracles, 77.3ms\n",
      "Speed: 1.7ms preprocess, 77.3ms inference, 0.6ms postprocess per image at shape (1, 3, 640, 416)\n",
      "\n",
      "image 1/1 /home/avicii/Mathmatic/dl-ml/CV/datasets/Oracle/3_Test/Figures/020146.jpg: 640x512 3 oracles, 89.1ms\n",
      "Speed: 1.4ms preprocess, 89.1ms inference, 0.5ms postprocess per image at shape (1, 3, 640, 512)\n",
      "\n",
      "image 1/1 /home/avicii/Mathmatic/dl-ml/CV/datasets/Oracle/3_Test/Figures/020074.jpg: 640x448 28 oracles, 63.1ms\n",
      "Speed: 1.9ms preprocess, 63.1ms inference, 0.6ms postprocess per image at shape (1, 3, 640, 448)\n",
      "\n",
      "image 1/1 /home/avicii/Mathmatic/dl-ml/CV/datasets/Oracle/3_Test/Figures/020135.jpg: 640x512 4 oracles, 70.1ms\n",
      "Speed: 1.4ms preprocess, 70.1ms inference, 0.6ms postprocess per image at shape (1, 3, 640, 512)\n",
      "\n",
      "image 1/1 /home/avicii/Mathmatic/dl-ml/CV/datasets/Oracle/3_Test/Figures/020018.jpg: 640x512 3 oracles, 72.7ms\n",
      "Speed: 1.5ms preprocess, 72.7ms inference, 0.5ms postprocess per image at shape (1, 3, 640, 512)\n",
      "\n",
      "image 1/1 /home/avicii/Mathmatic/dl-ml/CV/datasets/Oracle/3_Test/Figures/020063.jpg: 640x512 5 oracles, 68.0ms\n",
      "Speed: 1.4ms preprocess, 68.0ms inference, 0.5ms postprocess per image at shape (1, 3, 640, 512)\n",
      "\n",
      "image 1/1 /home/avicii/Mathmatic/dl-ml/CV/datasets/Oracle/3_Test/Figures/020110.jpg: 640x640 4 oracles, 81.3ms\n",
      "Speed: 2.0ms preprocess, 81.3ms inference, 0.5ms postprocess per image at shape (1, 3, 640, 640)\n",
      "\n",
      "image 1/1 /home/avicii/Mathmatic/dl-ml/CV/datasets/Oracle/3_Test/Figures/020134.jpg: 640x544 6 oracles, 79.0ms\n",
      "Speed: 1.7ms preprocess, 79.0ms inference, 0.7ms postprocess per image at shape (1, 3, 640, 544)\n",
      "\n",
      "image 1/1 /home/avicii/Mathmatic/dl-ml/CV/datasets/Oracle/3_Test/Figures/w01814.jpg: 640x384 5 oracles, 66.0ms\n",
      "Speed: 5.0ms preprocess, 66.0ms inference, 0.6ms postprocess per image at shape (1, 3, 640, 384)\n",
      "\n",
      "image 1/1 /home/avicii/Mathmatic/dl-ml/CV/datasets/Oracle/3_Test/Figures/w01797.jpg: 640x448 10 oracles, 46.5ms\n",
      "Speed: 1.5ms preprocess, 46.5ms inference, 0.5ms postprocess per image at shape (1, 3, 640, 448)\n",
      "\n",
      "image 1/1 /home/avicii/Mathmatic/dl-ml/CV/datasets/Oracle/3_Test/Figures/020040.jpg: 640x448 2 oracles, 71.2ms\n",
      "Speed: 1.9ms preprocess, 71.2ms inference, 0.6ms postprocess per image at shape (1, 3, 640, 448)\n",
      "\n",
      "image 1/1 /home/avicii/Mathmatic/dl-ml/CV/datasets/Oracle/3_Test/Figures/w01835.jpg: 640x544 5 oracles, 60.2ms\n",
      "Speed: 2.4ms preprocess, 60.2ms inference, 0.6ms postprocess per image at shape (1, 3, 640, 544)\n",
      "\n",
      "image 1/1 /home/avicii/Mathmatic/dl-ml/CV/datasets/Oracle/3_Test/Figures/020131.jpg: 640x544 6 oracles, 71.3ms\n",
      "Speed: 1.6ms preprocess, 71.3ms inference, 0.6ms postprocess per image at shape (1, 3, 640, 544)\n",
      "\n",
      "image 1/1 /home/avicii/Mathmatic/dl-ml/CV/datasets/Oracle/3_Test/Figures/020010.jpg: 640x352 3 oracles, 59.9ms\n",
      "Speed: 1.3ms preprocess, 59.9ms inference, 0.8ms postprocess per image at shape (1, 3, 640, 352)\n",
      "\n",
      "image 1/1 /home/avicii/Mathmatic/dl-ml/CV/datasets/Oracle/3_Test/Figures/020034.jpg: 640x512 11 oracles, 62.7ms\n",
      "Speed: 1.7ms preprocess, 62.7ms inference, 0.5ms postprocess per image at shape (1, 3, 640, 512)\n",
      "\n",
      "image 1/1 /home/avicii/Mathmatic/dl-ml/CV/datasets/Oracle/3_Test/Figures/020066.jpg: 640x320 9 oracles, 60.2ms\n",
      "Speed: 1.3ms preprocess, 60.2ms inference, 0.5ms postprocess per image at shape (1, 3, 640, 320)\n",
      "\n",
      "image 1/1 /home/avicii/Mathmatic/dl-ml/CV/datasets/Oracle/3_Test/Figures/020132.jpg: 640x480 3 oracles, 60.9ms\n",
      "Speed: 1.4ms preprocess, 60.9ms inference, 0.6ms postprocess per image at shape (1, 3, 640, 480)\n",
      "\n",
      "image 1/1 /home/avicii/Mathmatic/dl-ml/CV/datasets/Oracle/3_Test/Figures/020013.jpg: 640x640 4 oracles, 88.5ms\n",
      "Speed: 2.1ms preprocess, 88.5ms inference, 0.6ms postprocess per image at shape (1, 3, 640, 640)\n",
      "\n",
      "image 1/1 /home/avicii/Mathmatic/dl-ml/CV/datasets/Oracle/3_Test/Figures/w01817.jpg: 640x512 4 oracles, 65.5ms\n",
      "Speed: 1.3ms preprocess, 65.5ms inference, 0.5ms postprocess per image at shape (1, 3, 640, 512)\n",
      "\n",
      "image 1/1 /home/avicii/Mathmatic/dl-ml/CV/datasets/Oracle/3_Test/Figures/020043.jpg: 640x640 8 oracles, 79.0ms\n",
      "Speed: 2.8ms preprocess, 79.0ms inference, 0.6ms postprocess per image at shape (1, 3, 640, 640)\n",
      "\n",
      "image 1/1 /home/avicii/Mathmatic/dl-ml/CV/datasets/Oracle/3_Test/Figures/020139.jpg: 640x576 5 oracles, 93.3ms\n",
      "Speed: 2.2ms preprocess, 93.3ms inference, 1.0ms postprocess per image at shape (1, 3, 640, 576)\n",
      "\n",
      "image 1/1 /home/avicii/Mathmatic/dl-ml/CV/datasets/Oracle/3_Test/Figures/020084.jpg: 640x480 11 oracles, 66.6ms\n",
      "Speed: 1.7ms preprocess, 66.6ms inference, 0.5ms postprocess per image at shape (1, 3, 640, 480)\n",
      "\n",
      "image 1/1 /home/avicii/Mathmatic/dl-ml/CV/datasets/Oracle/3_Test/Figures/020020.jpg: 544x640 19 oracles, 73.1ms\n",
      "Speed: 2.2ms preprocess, 73.1ms inference, 1.2ms postprocess per image at shape (1, 3, 544, 640)\n",
      "\n",
      "image 1/1 /home/avicii/Mathmatic/dl-ml/CV/datasets/Oracle/3_Test/Figures/020000.jpg: 640x512 10 oracles, 84.2ms\n",
      "Speed: 1.8ms preprocess, 84.2ms inference, 0.5ms postprocess per image at shape (1, 3, 640, 512)\n",
      "\n",
      "image 1/1 /home/avicii/Mathmatic/dl-ml/CV/datasets/Oracle/3_Test/Figures/w01792.jpg: 640x480 6 oracles, 69.5ms\n",
      "Speed: 1.6ms preprocess, 69.5ms inference, 0.6ms postprocess per image at shape (1, 3, 640, 480)\n",
      "\n",
      "image 1/1 /home/avicii/Mathmatic/dl-ml/CV/datasets/Oracle/3_Test/Figures/020143.jpg: 640x576 11 oracles, 67.1ms\n",
      "Speed: 1.7ms preprocess, 67.1ms inference, 0.6ms postprocess per image at shape (1, 3, 640, 576)\n",
      "\n",
      "image 1/1 /home/avicii/Mathmatic/dl-ml/CV/datasets/Oracle/3_Test/Figures/020107.jpg: 640x608 3 oracles, 104.5ms\n",
      "Speed: 1.7ms preprocess, 104.5ms inference, 1.2ms postprocess per image at shape (1, 3, 640, 608)\n",
      "\n",
      "image 1/1 /home/avicii/Mathmatic/dl-ml/CV/datasets/Oracle/3_Test/Figures/w01830.jpg: 640x544 6 oracles, 76.5ms\n",
      "Speed: 2.1ms preprocess, 76.5ms inference, 0.5ms postprocess per image at shape (1, 3, 640, 544)\n",
      "\n",
      "image 1/1 /home/avicii/Mathmatic/dl-ml/CV/datasets/Oracle/3_Test/Figures/w01829.jpg: 640x448 4 oracles, 64.8ms\n",
      "Speed: 1.7ms preprocess, 64.8ms inference, 0.5ms postprocess per image at shape (1, 3, 640, 448)\n",
      "\n",
      "image 1/1 /home/avicii/Mathmatic/dl-ml/CV/datasets/Oracle/3_Test/Figures/020058.jpg: 640x512 6 oracles, 69.2ms\n",
      "Speed: 1.6ms preprocess, 69.2ms inference, 0.5ms postprocess per image at shape (1, 3, 640, 512)\n",
      "\n",
      "image 1/1 /home/avicii/Mathmatic/dl-ml/CV/datasets/Oracle/3_Test/Figures/w01841.jpg: 640x544 4 oracles, 82.5ms\n",
      "Speed: 1.4ms preprocess, 82.5ms inference, 0.5ms postprocess per image at shape (1, 3, 640, 544)\n",
      "\n",
      "image 1/1 /home/avicii/Mathmatic/dl-ml/CV/datasets/Oracle/3_Test/Figures/w01819.jpg: 640x448 7 oracles, 77.3ms\n",
      "Speed: 1.2ms preprocess, 77.3ms inference, 0.7ms postprocess per image at shape (1, 3, 640, 448)\n",
      "\n",
      "image 1/1 /home/avicii/Mathmatic/dl-ml/CV/datasets/Oracle/3_Test/Figures/020017.jpg: 640x544 49 oracles, 78.1ms\n",
      "Speed: 2.2ms preprocess, 78.1ms inference, 0.6ms postprocess per image at shape (1, 3, 640, 544)\n",
      "\n",
      "image 1/1 /home/avicii/Mathmatic/dl-ml/CV/datasets/Oracle/3_Test/Figures/w01842.jpg: 640x512 10 oracles, 48.3ms\n",
      "Speed: 1.4ms preprocess, 48.3ms inference, 0.5ms postprocess per image at shape (1, 3, 640, 512)\n",
      "\n",
      "image 1/1 /home/avicii/Mathmatic/dl-ml/CV/datasets/Oracle/3_Test/Figures/020104.jpg: 640x544 4 oracles, 50.5ms\n",
      "Speed: 1.6ms preprocess, 50.5ms inference, 0.5ms postprocess per image at shape (1, 3, 640, 544)\n",
      "\n",
      "image 1/1 /home/avicii/Mathmatic/dl-ml/CV/datasets/Oracle/3_Test/Figures/020059.jpg: 640x608 5 oracles, 72.4ms\n",
      "Speed: 1.6ms preprocess, 72.4ms inference, 0.6ms postprocess per image at shape (1, 3, 640, 608)\n",
      "\n",
      "image 1/1 /home/avicii/Mathmatic/dl-ml/CV/datasets/Oracle/3_Test/Figures/020026.jpg: 640x544 5 oracles, 53.5ms\n",
      "Speed: 1.5ms preprocess, 53.5ms inference, 0.6ms postprocess per image at shape (1, 3, 640, 544)\n",
      "\n",
      "image 1/1 /home/avicii/Mathmatic/dl-ml/CV/datasets/Oracle/3_Test/Figures/020055.jpg: 640x352 26 oracles, 55.6ms\n",
      "Speed: 1.2ms preprocess, 55.6ms inference, 0.6ms postprocess per image at shape (1, 3, 640, 352)\n",
      "\n",
      "image 1/1 /home/avicii/Mathmatic/dl-ml/CV/datasets/Oracle/3_Test/Figures/020049.jpg: 640x512 14 oracles, 50.7ms\n",
      "Speed: 1.6ms preprocess, 50.7ms inference, 0.5ms postprocess per image at shape (1, 3, 640, 512)\n",
      "\n",
      "image 1/1 /home/avicii/Mathmatic/dl-ml/CV/datasets/Oracle/3_Test/Figures/020086.jpg: 640x448 9 oracles, 45.3ms\n",
      "Speed: 2.5ms preprocess, 45.3ms inference, 0.6ms postprocess per image at shape (1, 3, 640, 448)\n",
      "\n",
      "image 1/1 /home/avicii/Mathmatic/dl-ml/CV/datasets/Oracle/3_Test/Figures/020128.jpg: 640x544 3 oracles, 70.2ms\n",
      "Speed: 1.5ms preprocess, 70.2ms inference, 0.6ms postprocess per image at shape (1, 3, 640, 544)\n",
      "\n",
      "image 1/1 /home/avicii/Mathmatic/dl-ml/CV/datasets/Oracle/3_Test/Figures/020122.jpg: 640x480 2 oracles, 66.9ms\n",
      "Speed: 1.5ms preprocess, 66.9ms inference, 0.5ms postprocess per image at shape (1, 3, 640, 480)\n",
      "\n",
      "image 1/1 /home/avicii/Mathmatic/dl-ml/CV/datasets/Oracle/3_Test/Figures/020012.jpg: 640x608 5 oracles, 58.1ms\n",
      "Speed: 1.9ms preprocess, 58.1ms inference, 0.6ms postprocess per image at shape (1, 3, 640, 608)\n",
      "\n",
      "image 1/1 /home/avicii/Mathmatic/dl-ml/CV/datasets/Oracle/3_Test/Figures/020144.jpg: 640x544 2 oracles, 49.1ms\n",
      "Speed: 1.5ms preprocess, 49.1ms inference, 0.5ms postprocess per image at shape (1, 3, 640, 544)\n",
      "\n",
      "image 1/1 /home/avicii/Mathmatic/dl-ml/CV/datasets/Oracle/3_Test/Figures/020141.jpg: 640x576 8 oracles, 93.6ms\n",
      "Speed: 1.7ms preprocess, 93.6ms inference, 1.3ms postprocess per image at shape (1, 3, 640, 576)\n",
      "\n",
      "image 1/1 /home/avicii/Mathmatic/dl-ml/CV/datasets/Oracle/3_Test/Figures/020088.jpg: 640x384 19 oracles, 61.9ms\n",
      "Speed: 1.4ms preprocess, 61.9ms inference, 1.8ms postprocess per image at shape (1, 3, 640, 384)\n",
      "\n",
      "image 1/1 /home/avicii/Mathmatic/dl-ml/CV/datasets/Oracle/3_Test/Figures/020069.jpg: 640x480 11 oracles, 60.1ms\n",
      "Speed: 2.0ms preprocess, 60.1ms inference, 0.5ms postprocess per image at shape (1, 3, 640, 480)\n",
      "\n",
      "image 1/1 /home/avicii/Mathmatic/dl-ml/CV/datasets/Oracle/3_Test/Figures/020031.jpg: 640x544 5 oracles, 80.3ms\n",
      "Speed: 1.6ms preprocess, 80.3ms inference, 0.9ms postprocess per image at shape (1, 3, 640, 544)\n",
      "\n",
      "image 1/1 /home/avicii/Mathmatic/dl-ml/CV/datasets/Oracle/3_Test/Figures/020073.jpg: 640x608 7 oracles, 64.7ms\n",
      "Speed: 2.3ms preprocess, 64.7ms inference, 0.5ms postprocess per image at shape (1, 3, 640, 608)\n",
      "\n",
      "image 1/1 /home/avicii/Mathmatic/dl-ml/CV/datasets/Oracle/3_Test/Figures/w01840.jpg: 640x480 6 oracles, 57.2ms\n",
      "Speed: 1.3ms preprocess, 57.2ms inference, 0.5ms postprocess per image at shape (1, 3, 640, 480)\n",
      "\n",
      "image 1/1 /home/avicii/Mathmatic/dl-ml/CV/datasets/Oracle/3_Test/Figures/020001.jpg: 640x480 12 oracles, 78.4ms\n",
      "Speed: 1.5ms preprocess, 78.4ms inference, 0.8ms postprocess per image at shape (1, 3, 640, 480)\n",
      "\n",
      "image 1/1 /home/avicii/Mathmatic/dl-ml/CV/datasets/Oracle/3_Test/Figures/020148.jpg: 640x512 6 oracles, 81.7ms\n",
      "Speed: 1.5ms preprocess, 81.7ms inference, 0.6ms postprocess per image at shape (1, 3, 640, 512)\n",
      "\n",
      "image 1/1 /home/avicii/Mathmatic/dl-ml/CV/datasets/Oracle/3_Test/Figures/020021.jpg: 640x384 5 oracles, 55.1ms\n",
      "Speed: 0.7ms preprocess, 55.1ms inference, 0.6ms postprocess per image at shape (1, 3, 640, 384)\n",
      "\n",
      "image 1/1 /home/avicii/Mathmatic/dl-ml/CV/datasets/Oracle/3_Test/Figures/w01794.jpg: 640x416 9 oracles, 62.7ms\n",
      "Speed: 1.6ms preprocess, 62.7ms inference, 0.6ms postprocess per image at shape (1, 3, 640, 416)\n",
      "\n",
      "image 1/1 /home/avicii/Mathmatic/dl-ml/CV/datasets/Oracle/3_Test/Figures/020094.jpg: 640x480 6 oracles, 48.0ms\n",
      "Speed: 1.4ms preprocess, 48.0ms inference, 0.6ms postprocess per image at shape (1, 3, 640, 480)\n",
      "\n",
      "image 1/1 /home/avicii/Mathmatic/dl-ml/CV/datasets/Oracle/3_Test/Figures/020008.jpg: 640x480 9 oracles, 46.9ms\n",
      "Speed: 1.6ms preprocess, 46.9ms inference, 0.6ms postprocess per image at shape (1, 3, 640, 480)\n",
      "\n",
      "image 1/1 /home/avicii/Mathmatic/dl-ml/CV/datasets/Oracle/3_Test/Figures/020014.jpg: 608x640 5 oracles, 57.7ms\n",
      "Speed: 1.2ms preprocess, 57.7ms inference, 0.5ms postprocess per image at shape (1, 3, 608, 640)\n",
      "\n",
      "image 1/1 /home/avicii/Mathmatic/dl-ml/CV/datasets/Oracle/3_Test/Figures/020103.jpg: 640x544 8 oracles, 72.5ms\n",
      "Speed: 1.6ms preprocess, 72.5ms inference, 0.5ms postprocess per image at shape (1, 3, 640, 544)\n",
      "\n",
      "image 1/1 /home/avicii/Mathmatic/dl-ml/CV/datasets/Oracle/3_Test/Figures/020125.jpg: 640x544 4 oracles, 71.5ms\n",
      "Speed: 1.6ms preprocess, 71.5ms inference, 0.6ms postprocess per image at shape (1, 3, 640, 544)\n",
      "\n",
      "image 1/1 /home/avicii/Mathmatic/dl-ml/CV/datasets/Oracle/3_Test/Figures/w01812.jpg: 640x416 4 oracles, 41.4ms\n",
      "Speed: 1.4ms preprocess, 41.4ms inference, 0.5ms postprocess per image at shape (1, 3, 640, 416)\n",
      "\n",
      "image 1/1 /home/avicii/Mathmatic/dl-ml/CV/datasets/Oracle/3_Test/Figures/020113.jpg: 640x352 16 oracles, 36.8ms\n",
      "Speed: 1.8ms preprocess, 36.8ms inference, 0.5ms postprocess per image at shape (1, 3, 640, 352)\n",
      "\n",
      "image 1/1 /home/avicii/Mathmatic/dl-ml/CV/datasets/Oracle/3_Test/Figures/020016.jpg: 640x544 4 oracles, 53.1ms\n",
      "Speed: 1.6ms preprocess, 53.1ms inference, 0.5ms postprocess per image at shape (1, 3, 640, 544)\n",
      "\n",
      "image 1/1 /home/avicii/Mathmatic/dl-ml/CV/datasets/Oracle/3_Test/Figures/w01822.jpg: 640x416 9 oracles, 42.1ms\n",
      "Speed: 1.4ms preprocess, 42.1ms inference, 0.5ms postprocess per image at shape (1, 3, 640, 416)\n",
      "\n",
      "image 1/1 /home/avicii/Mathmatic/dl-ml/CV/datasets/Oracle/3_Test/Figures/020126.jpg: 640x480 4 oracles, 64.3ms\n",
      "Speed: 1.4ms preprocess, 64.3ms inference, 0.5ms postprocess per image at shape (1, 3, 640, 480)\n",
      "\n",
      "image 1/1 /home/avicii/Mathmatic/dl-ml/CV/datasets/Oracle/3_Test/Figures/020024.jpg: 640x512 33 oracles, 80.1ms\n",
      "Speed: 1.8ms preprocess, 80.1ms inference, 0.6ms postprocess per image at shape (1, 3, 640, 512)\n",
      "\n",
      "image 1/1 /home/avicii/Mathmatic/dl-ml/CV/datasets/Oracle/3_Test/Figures/020033.jpg: 640x544 5 oracles, 80.1ms\n",
      "Speed: 1.5ms preprocess, 80.1ms inference, 0.6ms postprocess per image at shape (1, 3, 640, 544)\n",
      "\n",
      "image 1/1 /home/avicii/Mathmatic/dl-ml/CV/datasets/Oracle/3_Test/Figures/w01825.jpg: 640x448 11 oracles, 77.6ms\n",
      "Speed: 1.2ms preprocess, 77.6ms inference, 0.6ms postprocess per image at shape (1, 3, 640, 448)\n",
      "\n",
      "image 1/1 /home/avicii/Mathmatic/dl-ml/CV/datasets/Oracle/3_Test/Figures/020114.jpg: 640x416 6 oracles, 60.9ms\n",
      "Speed: 1.3ms preprocess, 60.9ms inference, 0.7ms postprocess per image at shape (1, 3, 640, 416)\n",
      "\n",
      "image 1/1 /home/avicii/Mathmatic/dl-ml/CV/datasets/Oracle/3_Test/Figures/020075.jpg: 640x352 25 oracles, 90.7ms\n",
      "Speed: 4.4ms preprocess, 90.7ms inference, 0.6ms postprocess per image at shape (1, 3, 640, 352)\n",
      "\n",
      "image 1/1 /home/avicii/Mathmatic/dl-ml/CV/datasets/Oracle/3_Test/Figures/w01815.jpg: 640x448 4 oracles, 86.0ms\n",
      "Speed: 1.7ms preprocess, 86.0ms inference, 0.8ms postprocess per image at shape (1, 3, 640, 448)\n",
      "\n",
      "image 1/1 /home/avicii/Mathmatic/dl-ml/CV/datasets/Oracle/3_Test/Figures/w01808.jpg: 640x480 10 oracles, 85.0ms\n",
      "Speed: 1.9ms preprocess, 85.0ms inference, 0.8ms postprocess per image at shape (1, 3, 640, 480)\n",
      "\n",
      "image 1/1 /home/avicii/Mathmatic/dl-ml/CV/datasets/Oracle/3_Test/Figures/w01832.jpg: 640x416 3 oracles, 78.7ms\n",
      "Speed: 1.5ms preprocess, 78.7ms inference, 0.8ms postprocess per image at shape (1, 3, 640, 416)\n",
      "\n",
      "image 1/1 /home/avicii/Mathmatic/dl-ml/CV/datasets/Oracle/3_Test/Figures/020085.jpg: 640x384 8 oracles, 40.6ms\n",
      "Speed: 1.7ms preprocess, 40.6ms inference, 0.6ms postprocess per image at shape (1, 3, 640, 384)\n",
      "\n",
      "image 1/1 /home/avicii/Mathmatic/dl-ml/CV/datasets/Oracle/3_Test/Figures/020095.jpg: 384x640 4 oracles, 53.7ms\n",
      "Speed: 2.1ms preprocess, 53.7ms inference, 0.5ms postprocess per image at shape (1, 3, 384, 640)\n",
      "\n",
      "image 1/1 /home/avicii/Mathmatic/dl-ml/CV/datasets/Oracle/3_Test/Figures/020101.jpg: 640x448 5 oracles, 47.3ms\n",
      "Speed: 1.4ms preprocess, 47.3ms inference, 0.6ms postprocess per image at shape (1, 3, 640, 448)\n",
      "\n",
      "image 1/1 /home/avicii/Mathmatic/dl-ml/CV/datasets/Oracle/3_Test/Figures/020140.jpg: 640x608 9 oracles, 58.7ms\n",
      "Speed: 2.2ms preprocess, 58.7ms inference, 0.5ms postprocess per image at shape (1, 3, 640, 608)\n",
      "\n",
      "image 1/1 /home/avicii/Mathmatic/dl-ml/CV/datasets/Oracle/3_Test/Figures/020065.jpg: 640x576 16 oracles, 74.2ms\n",
      "Speed: 2.4ms preprocess, 74.2ms inference, 0.5ms postprocess per image at shape (1, 3, 640, 576)\n",
      "\n",
      "image 1/1 /home/avicii/Mathmatic/dl-ml/CV/datasets/Oracle/3_Test/Figures/020046.jpg: 640x576 10 oracles, 56.6ms\n",
      "Speed: 2.8ms preprocess, 56.6ms inference, 0.6ms postprocess per image at shape (1, 3, 640, 576)\n",
      "\n",
      "image 1/1 /home/avicii/Mathmatic/dl-ml/CV/datasets/Oracle/3_Test/Figures/020009.jpg: 640x448 11 oracles, 44.7ms\n",
      "Speed: 1.4ms preprocess, 44.7ms inference, 0.5ms postprocess per image at shape (1, 3, 640, 448)\n",
      "\n",
      "image 1/1 /home/avicii/Mathmatic/dl-ml/CV/datasets/Oracle/3_Test/Figures/020079.jpg: 640x544 6 oracles, 69.2ms\n",
      "Speed: 1.5ms preprocess, 69.2ms inference, 0.7ms postprocess per image at shape (1, 3, 640, 544)\n",
      "\n",
      "image 1/1 /home/avicii/Mathmatic/dl-ml/CV/datasets/Oracle/3_Test/Figures/020124.jpg: 640x608 7 oracles, 76.2ms\n",
      "Speed: 1.9ms preprocess, 76.2ms inference, 0.5ms postprocess per image at shape (1, 3, 640, 608)\n",
      "\n",
      "image 1/1 /home/avicii/Mathmatic/dl-ml/CV/datasets/Oracle/3_Test/Figures/w01821.jpg: 640x512 5 oracles, 86.3ms\n",
      "Speed: 1.3ms preprocess, 86.3ms inference, 1.0ms postprocess per image at shape (1, 3, 640, 512)\n",
      "\n",
      "image 1/1 /home/avicii/Mathmatic/dl-ml/CV/datasets/Oracle/3_Test/Figures/020064.jpg: 640x512 22 oracles, 65.3ms\n",
      "Speed: 1.8ms preprocess, 65.3ms inference, 0.9ms postprocess per image at shape (1, 3, 640, 512)\n",
      "\n",
      "image 1/1 /home/avicii/Mathmatic/dl-ml/CV/datasets/Oracle/3_Test/Figures/020067.jpg: 640x256 13 oracles, 75.7ms\n",
      "Speed: 1.1ms preprocess, 75.7ms inference, 0.6ms postprocess per image at shape (1, 3, 640, 256)\n",
      "\n",
      "image 1/1 /home/avicii/Mathmatic/dl-ml/CV/datasets/Oracle/3_Test/Figures/020072.jpg: 544x640 34 oracles, 52.1ms\n",
      "Speed: 2.0ms preprocess, 52.1ms inference, 0.7ms postprocess per image at shape (1, 3, 544, 640)\n",
      "\n",
      "image 1/1 /home/avicii/Mathmatic/dl-ml/CV/datasets/Oracle/3_Test/Figures/020081.jpg: 640x512 4 oracles, 66.3ms\n",
      "Speed: 1.6ms preprocess, 66.3ms inference, 0.5ms postprocess per image at shape (1, 3, 640, 512)\n",
      "\n",
      "image 1/1 /home/avicii/Mathmatic/dl-ml/CV/datasets/Oracle/3_Test/Figures/020142.jpg: 640x480 6 oracles, 77.3ms\n",
      "Speed: 1.3ms preprocess, 77.3ms inference, 0.6ms postprocess per image at shape (1, 3, 640, 480)\n",
      "\n",
      "image 1/1 /home/avicii/Mathmatic/dl-ml/CV/datasets/Oracle/3_Test/Figures/w01833.jpg: 640x480 5 oracles, 47.5ms\n",
      "Speed: 1.5ms preprocess, 47.5ms inference, 0.5ms postprocess per image at shape (1, 3, 640, 480)\n",
      "\n",
      "image 1/1 /home/avicii/Mathmatic/dl-ml/CV/datasets/Oracle/3_Test/Figures/020015.jpg: 640x576 10 oracles, 82.5ms\n",
      "Speed: 1.7ms preprocess, 82.5ms inference, 0.5ms postprocess per image at shape (1, 3, 640, 576)\n",
      "\n",
      "image 1/1 /home/avicii/Mathmatic/dl-ml/CV/datasets/Oracle/3_Test/Figures/W01809.jpg: 640x544 4 oracles, 80.2ms\n",
      "Speed: 1.4ms preprocess, 80.2ms inference, 0.5ms postprocess per image at shape (1, 3, 640, 544)\n",
      "\n",
      "image 1/1 /home/avicii/Mathmatic/dl-ml/CV/datasets/Oracle/3_Test/Figures/020025.jpg: 640x608 12 oracles, 66.6ms\n",
      "Speed: 1.8ms preprocess, 66.6ms inference, 0.5ms postprocess per image at shape (1, 3, 640, 608)\n",
      "\n",
      "image 1/1 /home/avicii/Mathmatic/dl-ml/CV/datasets/Oracle/3_Test/Figures/w01810.jpg: 640x416 8 oracles, 61.2ms\n",
      "Speed: 1.5ms preprocess, 61.2ms inference, 0.7ms postprocess per image at shape (1, 3, 640, 416)\n",
      "\n",
      "image 1/1 /home/avicii/Mathmatic/dl-ml/CV/datasets/Oracle/3_Test/Figures/020149.jpg: 480x640 24 oracles, 86.4ms\n",
      "Speed: 2.0ms preprocess, 86.4ms inference, 0.7ms postprocess per image at shape (1, 3, 480, 640)\n",
      "\n",
      "image 1/1 /home/avicii/Mathmatic/dl-ml/CV/datasets/Oracle/3_Test/Figures/020102.jpg: 640x576 5 oracles, 100.9ms\n",
      "Speed: 1.6ms preprocess, 100.9ms inference, 1.0ms postprocess per image at shape (1, 3, 640, 576)\n",
      "\n",
      "image 1/1 /home/avicii/Mathmatic/dl-ml/CV/datasets/Oracle/3_Test/Figures/w01801.jpg: 640x416 8 oracles, 61.0ms\n",
      "Speed: 1.7ms preprocess, 61.0ms inference, 0.6ms postprocess per image at shape (1, 3, 640, 416)\n",
      "\n",
      "image 1/1 /home/avicii/Mathmatic/dl-ml/CV/datasets/Oracle/3_Test/Figures/020099.jpg: 640x576 4 oracles, 77.5ms\n",
      "Speed: 1.7ms preprocess, 77.5ms inference, 0.6ms postprocess per image at shape (1, 3, 640, 576)\n",
      "\n",
      "image 1/1 /home/avicii/Mathmatic/dl-ml/CV/datasets/Oracle/3_Test/Figures/020091.jpg: 640x480 7 oracles, 64.5ms\n",
      "Speed: 1.4ms preprocess, 64.5ms inference, 0.8ms postprocess per image at shape (1, 3, 640, 480)\n",
      "\n",
      "image 1/1 /home/avicii/Mathmatic/dl-ml/CV/datasets/Oracle/3_Test/Figures/020045.jpg: 640x448 13 oracles, 40.0ms\n",
      "Speed: 2.0ms preprocess, 40.0ms inference, 0.5ms postprocess per image at shape (1, 3, 640, 448)\n",
      "\n",
      "image 1/1 /home/avicii/Mathmatic/dl-ml/CV/datasets/Oracle/3_Test/Figures/020080.jpg: 640x448 16 oracles, 73.3ms\n",
      "Speed: 1.5ms preprocess, 73.3ms inference, 0.7ms postprocess per image at shape (1, 3, 640, 448)\n",
      "\n",
      "image 1/1 /home/avicii/Mathmatic/dl-ml/CV/datasets/Oracle/3_Test/Figures/020098.jpg: 640x512 35 oracles, 80.2ms\n",
      "Speed: 1.6ms preprocess, 80.2ms inference, 0.5ms postprocess per image at shape (1, 3, 640, 512)\n",
      "\n",
      "image 1/1 /home/avicii/Mathmatic/dl-ml/CV/datasets/Oracle/3_Test/Figures/w01804.jpg: 640x576 6 oracles, 100.5ms\n",
      "Speed: 1.7ms preprocess, 100.5ms inference, 0.8ms postprocess per image at shape (1, 3, 640, 576)\n",
      "\n",
      "image 1/1 /home/avicii/Mathmatic/dl-ml/CV/datasets/Oracle/3_Test/Figures/020003.jpg: 640x576 3 oracles, 101.7ms\n",
      "Speed: 1.9ms preprocess, 101.7ms inference, 1.1ms postprocess per image at shape (1, 3, 640, 576)\n",
      "\n",
      "image 1/1 /home/avicii/Mathmatic/dl-ml/CV/datasets/Oracle/3_Test/Figures/w01795.jpg: 640x480 11 oracles, 77.9ms\n",
      "Speed: 1.7ms preprocess, 77.9ms inference, 0.6ms postprocess per image at shape (1, 3, 640, 480)\n",
      "\n",
      "image 1/1 /home/avicii/Mathmatic/dl-ml/CV/datasets/Oracle/3_Test/Figures/w01798.jpg: 640x576 23 oracles, 105.2ms\n",
      "Speed: 1.8ms preprocess, 105.2ms inference, 1.1ms postprocess per image at shape (1, 3, 640, 576)\n",
      "\n",
      "image 1/1 /home/avicii/Mathmatic/dl-ml/CV/datasets/Oracle/3_Test/Figures/020057.jpg: 640x480 17 oracles, 83.9ms\n",
      "Speed: 2.2ms preprocess, 83.9ms inference, 0.6ms postprocess per image at shape (1, 3, 640, 480)\n",
      "\n",
      "image 1/1 /home/avicii/Mathmatic/dl-ml/CV/datasets/Oracle/3_Test/Figures/020108.jpg: 640x544 1 oracle, 86.8ms\n",
      "Speed: 1.9ms preprocess, 86.8ms inference, 1.0ms postprocess per image at shape (1, 3, 640, 544)\n",
      "\n",
      "image 1/1 /home/avicii/Mathmatic/dl-ml/CV/datasets/Oracle/3_Test/Figures/020127.jpg: 640x576 3 oracles, 85.7ms\n",
      "Speed: 1.9ms preprocess, 85.7ms inference, 0.5ms postprocess per image at shape (1, 3, 640, 576)\n",
      "\n",
      "image 1/1 /home/avicii/Mathmatic/dl-ml/CV/datasets/Oracle/3_Test/Figures/w01799.jpg: 640x608 5 oracles, 88.4ms\n",
      "Speed: 2.1ms preprocess, 88.4ms inference, 0.5ms postprocess per image at shape (1, 3, 640, 608)\n",
      "\n",
      "image 1/1 /home/avicii/Mathmatic/dl-ml/CV/datasets/Oracle/3_Test/Figures/020050.jpg: 640x512 (no detections), 49.5ms\n",
      "Speed: 1.5ms preprocess, 49.5ms inference, 0.3ms postprocess per image at shape (1, 3, 640, 512)\n",
      "\n",
      "image 1/1 /home/avicii/Mathmatic/dl-ml/CV/datasets/Oracle/3_Test/Figures/w01831.jpg: 640x416 8 oracles, 60.4ms\n",
      "Speed: 1.6ms preprocess, 60.4ms inference, 0.7ms postprocess per image at shape (1, 3, 640, 416)\n",
      "\n",
      "image 1/1 /home/avicii/Mathmatic/dl-ml/CV/datasets/Oracle/3_Test/Figures/020137.jpg: 640x576 3 oracles, 86.8ms\n",
      "Speed: 1.8ms preprocess, 86.8ms inference, 0.5ms postprocess per image at shape (1, 3, 640, 576)\n",
      "\n",
      "image 1/1 /home/avicii/Mathmatic/dl-ml/CV/datasets/Oracle/3_Test/Figures/020052.jpg: 640x544 10 oracles, 53.3ms\n",
      "Speed: 1.6ms preprocess, 53.3ms inference, 0.6ms postprocess per image at shape (1, 3, 640, 544)\n",
      "\n",
      "image 1/1 /home/avicii/Mathmatic/dl-ml/CV/datasets/Oracle/3_Test/Figures/w01839.jpg: 640x480 6 oracles, 66.3ms\n",
      "Speed: 1.9ms preprocess, 66.3ms inference, 0.9ms postprocess per image at shape (1, 3, 640, 480)\n",
      "\n",
      "image 1/1 /home/avicii/Mathmatic/dl-ml/CV/datasets/Oracle/3_Test/Figures/w01838.jpg: 640x416 5 oracles, 71.7ms\n",
      "Speed: 1.1ms preprocess, 71.7ms inference, 0.8ms postprocess per image at shape (1, 3, 640, 416)\n",
      "\n",
      "image 1/1 /home/avicii/Mathmatic/dl-ml/CV/datasets/Oracle/3_Test/Figures/020038.jpg: 640x384 11 oracles, 62.0ms\n",
      "Speed: 2.2ms preprocess, 62.0ms inference, 0.6ms postprocess per image at shape (1, 3, 640, 384)\n",
      "\n",
      "image 1/1 /home/avicii/Mathmatic/dl-ml/CV/datasets/Oracle/3_Test/Figures/w01823.jpg: 640x480 6 oracles, 69.9ms\n",
      "Speed: 1.7ms preprocess, 69.9ms inference, 0.5ms postprocess per image at shape (1, 3, 640, 480)\n",
      "\n",
      "image 1/1 /home/avicii/Mathmatic/dl-ml/CV/datasets/Oracle/3_Test/Figures/020121.jpg: 640x608 5 oracles, 63.3ms\n",
      "Speed: 2.1ms preprocess, 63.3ms inference, 0.5ms postprocess per image at shape (1, 3, 640, 608)\n",
      "\n",
      "image 1/1 /home/avicii/Mathmatic/dl-ml/CV/datasets/Oracle/3_Test/Figures/020054.jpg: 640x384 5 oracles, 63.6ms\n",
      "Speed: 1.3ms preprocess, 63.6ms inference, 0.5ms postprocess per image at shape (1, 3, 640, 384)\n",
      "\n",
      "image 1/1 /home/avicii/Mathmatic/dl-ml/CV/datasets/Oracle/3_Test/Figures/020145.jpg: 640x576 5 oracles, 59.4ms\n",
      "Speed: 1.6ms preprocess, 59.4ms inference, 0.6ms postprocess per image at shape (1, 3, 640, 576)\n",
      "\n",
      "image 1/1 /home/avicii/Mathmatic/dl-ml/CV/datasets/Oracle/3_Test/Figures/w01828.jpg: 640x544 7 oracles, 56.8ms\n",
      "Speed: 1.8ms preprocess, 56.8ms inference, 0.7ms postprocess per image at shape (1, 3, 640, 544)\n",
      "\n",
      "image 1/1 /home/avicii/Mathmatic/dl-ml/CV/datasets/Oracle/3_Test/Figures/020129.jpg: 640x576 7 oracles, 94.8ms\n",
      "Speed: 1.7ms preprocess, 94.8ms inference, 0.5ms postprocess per image at shape (1, 3, 640, 576)\n",
      "\n",
      "image 1/1 /home/avicii/Mathmatic/dl-ml/CV/datasets/Oracle/3_Test/Figures/020093.jpg: 640x480 6 oracles, 69.2ms\n",
      "Speed: 1.5ms preprocess, 69.2ms inference, 0.5ms postprocess per image at shape (1, 3, 640, 480)\n",
      "\n",
      "image 1/1 /home/avicii/Mathmatic/dl-ml/CV/datasets/Oracle/3_Test/Figures/020136.jpg: 640x512 4 oracles, 91.2ms\n",
      "Speed: 1.7ms preprocess, 91.2ms inference, 0.5ms postprocess per image at shape (1, 3, 640, 512)\n",
      "\n",
      "image 1/1 /home/avicii/Mathmatic/dl-ml/CV/datasets/Oracle/3_Test/Figures/020035.jpg: 640x480 7 oracles, 69.7ms\n",
      "Speed: 1.5ms preprocess, 69.7ms inference, 0.6ms postprocess per image at shape (1, 3, 640, 480)\n",
      "\n",
      "image 1/1 /home/avicii/Mathmatic/dl-ml/CV/datasets/Oracle/3_Test/Figures/020147.jpg: 640x448 3 oracles, 76.6ms\n",
      "Speed: 1.4ms preprocess, 76.6ms inference, 1.0ms postprocess per image at shape (1, 3, 640, 448)\n",
      "\n",
      "image 1/1 /home/avicii/Mathmatic/dl-ml/CV/datasets/Oracle/3_Test/Figures/w01800.jpg: 640x448 5 oracles, 76.7ms\n",
      "Speed: 1.5ms preprocess, 76.7ms inference, 0.6ms postprocess per image at shape (1, 3, 640, 448)\n",
      "\n",
      "image 1/1 /home/avicii/Mathmatic/dl-ml/CV/datasets/Oracle/3_Test/Figures/020083.jpg: 640x512 12 oracles, 92.3ms\n",
      "Speed: 1.7ms preprocess, 92.3ms inference, 0.6ms postprocess per image at shape (1, 3, 640, 512)\n",
      "\n",
      "image 1/1 /home/avicii/Mathmatic/dl-ml/CV/datasets/Oracle/3_Test/Figures/020082.jpg: 640x480 13 oracles, 69.5ms\n",
      "Speed: 1.5ms preprocess, 69.5ms inference, 0.6ms postprocess per image at shape (1, 3, 640, 480)\n",
      "\n",
      "image 1/1 /home/avicii/Mathmatic/dl-ml/CV/datasets/Oracle/3_Test/Figures/w01816.jpg: 640x544 5 oracles, 92.7ms\n",
      "Speed: 1.7ms preprocess, 92.7ms inference, 0.7ms postprocess per image at shape (1, 3, 640, 544)\n",
      "\n",
      "image 1/1 /home/avicii/Mathmatic/dl-ml/CV/datasets/Oracle/3_Test/Figures/020138.jpg: 640x512 7 oracles, 70.4ms\n",
      "Speed: 1.6ms preprocess, 70.4ms inference, 0.6ms postprocess per image at shape (1, 3, 640, 512)\n",
      "\n",
      "image 1/1 /home/avicii/Mathmatic/dl-ml/CV/datasets/Oracle/3_Test/Figures/w01806.jpg: 640x576 6 oracles, 97.5ms\n",
      "Speed: 1.9ms preprocess, 97.5ms inference, 0.7ms postprocess per image at shape (1, 3, 640, 576)\n",
      "\n",
      "image 1/1 /home/avicii/Mathmatic/dl-ml/CV/datasets/Oracle/3_Test/Figures/020060.jpg: 640x608 10 oracles, 100.5ms\n",
      "Speed: 2.3ms preprocess, 100.5ms inference, 1.0ms postprocess per image at shape (1, 3, 640, 608)\n",
      "\n",
      "image 1/1 /home/avicii/Mathmatic/dl-ml/CV/datasets/Oracle/3_Test/Figures/w01793.jpg: 640x384 3 oracles, 45.2ms\n",
      "Speed: 1.7ms preprocess, 45.2ms inference, 0.6ms postprocess per image at shape (1, 3, 640, 384)\n",
      "\n",
      "image 1/1 /home/avicii/Mathmatic/dl-ml/CV/datasets/Oracle/3_Test/Figures/020097.jpg: 640x512 10 oracles, 71.6ms\n",
      "Speed: 1.7ms preprocess, 71.6ms inference, 0.5ms postprocess per image at shape (1, 3, 640, 512)\n",
      "\n",
      "image 1/1 /home/avicii/Mathmatic/dl-ml/CV/datasets/Oracle/3_Test/Figures/w01818.jpg: 640x416 7 oracles, 62.7ms\n",
      "Speed: 1.6ms preprocess, 62.7ms inference, 0.6ms postprocess per image at shape (1, 3, 640, 416)\n",
      "\n",
      "image 1/1 /home/avicii/Mathmatic/dl-ml/CV/datasets/Oracle/3_Test/Figures/020118.jpg: 640x576 4 oracles, 95.5ms\n",
      "Speed: 2.1ms preprocess, 95.5ms inference, 0.8ms postprocess per image at shape (1, 3, 640, 576)\n",
      "\n",
      "image 1/1 /home/avicii/Mathmatic/dl-ml/CV/datasets/Oracle/3_Test/Figures/W01796.jpg: 640x384 7 oracles, 56.0ms\n",
      "Speed: 1.2ms preprocess, 56.0ms inference, 0.9ms postprocess per image at shape (1, 3, 640, 384)\n",
      "\n",
      "image 1/1 /home/avicii/Mathmatic/dl-ml/CV/datasets/Oracle/3_Test/Figures/020056.jpg: 640x640 5 oracles, 99.7ms\n",
      "Speed: 1.9ms preprocess, 99.7ms inference, 0.6ms postprocess per image at shape (1, 3, 640, 640)\n",
      "\n",
      "image 1/1 /home/avicii/Mathmatic/dl-ml/CV/datasets/Oracle/3_Test/Figures/w01811.jpg: 640x512 6 oracles, 90.2ms\n",
      "Speed: 1.6ms preprocess, 90.2ms inference, 0.7ms postprocess per image at shape (1, 3, 640, 512)\n",
      "\n",
      "image 1/1 /home/avicii/Mathmatic/dl-ml/CV/datasets/Oracle/3_Test/Figures/020019.jpg: 640x576 14 oracles, 78.2ms\n",
      "Speed: 1.9ms preprocess, 78.2ms inference, 0.6ms postprocess per image at shape (1, 3, 640, 576)\n",
      "\n",
      "image 1/1 /home/avicii/Mathmatic/dl-ml/CV/datasets/Oracle/3_Test/Figures/020062.jpg: 640x480 3 oracles, 74.7ms\n",
      "Speed: 1.5ms preprocess, 74.7ms inference, 0.7ms postprocess per image at shape (1, 3, 640, 480)\n",
      "\n",
      "image 1/1 /home/avicii/Mathmatic/dl-ml/CV/datasets/Oracle/3_Test/Figures/020105.jpg: 640x640 9 oracles, 99.4ms\n",
      "Speed: 4.0ms preprocess, 99.4ms inference, 0.7ms postprocess per image at shape (1, 3, 640, 640)\n",
      "\n",
      "image 1/1 /home/avicii/Mathmatic/dl-ml/CV/datasets/Oracle/3_Test/Figures/020115.jpg: 640x480 6 oracles, 90.3ms\n",
      "Speed: 3.5ms preprocess, 90.3ms inference, 0.6ms postprocess per image at shape (1, 3, 640, 480)\n",
      "\n",
      "image 1/1 /home/avicii/Mathmatic/dl-ml/CV/datasets/Oracle/3_Test/Figures/020100.jpg: 640x576 6 oracles, 100.6ms\n",
      "Speed: 1.8ms preprocess, 100.6ms inference, 0.6ms postprocess per image at shape (1, 3, 640, 576)\n",
      "\n",
      "image 1/1 /home/avicii/Mathmatic/dl-ml/CV/datasets/Oracle/3_Test/Figures/w01803.jpg: 640x480 8 oracles, 90.2ms\n",
      "Speed: 1.5ms preprocess, 90.2ms inference, 0.6ms postprocess per image at shape (1, 3, 640, 480)\n",
      "\n",
      "image 1/1 /home/avicii/Mathmatic/dl-ml/CV/datasets/Oracle/3_Test/Figures/020077.jpg: 640x512 6 oracles, 89.7ms\n",
      "Speed: 1.7ms preprocess, 89.7ms inference, 0.7ms postprocess per image at shape (1, 3, 640, 512)\n",
      "\n",
      "image 1/1 /home/avicii/Mathmatic/dl-ml/CV/datasets/Oracle/3_Test/Figures/020120.jpg: 640x480 3 oracles, 49.6ms\n",
      "Speed: 1.7ms preprocess, 49.6ms inference, 0.5ms postprocess per image at shape (1, 3, 640, 480)\n",
      "\n",
      "image 1/1 /home/avicii/Mathmatic/dl-ml/CV/datasets/Oracle/3_Test/Figures/020106.jpg: 640x480 6 oracles, 83.1ms\n",
      "Speed: 1.7ms preprocess, 83.1ms inference, 0.5ms postprocess per image at shape (1, 3, 640, 480)\n",
      "\n",
      "image 1/1 /home/avicii/Mathmatic/dl-ml/CV/datasets/Oracle/3_Test/Figures/w01807.jpg: 640x608 7 oracles, 101.9ms\n",
      "Speed: 2.2ms preprocess, 101.9ms inference, 0.8ms postprocess per image at shape (1, 3, 640, 608)\n",
      "\n",
      "image 1/1 /home/avicii/Mathmatic/dl-ml/CV/datasets/Oracle/3_Test/Figures/020042.jpg: 640x544 8 oracles, 74.1ms\n",
      "Speed: 2.0ms preprocess, 74.1ms inference, 0.5ms postprocess per image at shape (1, 3, 640, 544)\n",
      "\n",
      "image 1/1 /home/avicii/Mathmatic/dl-ml/CV/datasets/Oracle/3_Test/Figures/020002.jpg: 640x512 7 oracles, 92.6ms\n",
      "Speed: 1.8ms preprocess, 92.6ms inference, 0.6ms postprocess per image at shape (1, 3, 640, 512)\n",
      "\n",
      "image 1/1 /home/avicii/Mathmatic/dl-ml/CV/datasets/Oracle/3_Test/Figures/020022.jpg: 640x512 5 oracles, 89.2ms\n",
      "Speed: 1.5ms preprocess, 89.2ms inference, 0.6ms postprocess per image at shape (1, 3, 640, 512)\n",
      "\n",
      "image 1/1 /home/avicii/Mathmatic/dl-ml/CV/datasets/Oracle/3_Test/Figures/020028.jpg: 640x576 17 oracles, 79.5ms\n",
      "Speed: 1.7ms preprocess, 79.5ms inference, 0.7ms postprocess per image at shape (1, 3, 640, 576)\n",
      "\n",
      "image 1/1 /home/avicii/Mathmatic/dl-ml/CV/datasets/Oracle/3_Test/Figures/020112.jpg: 640x352 8 oracles, 38.6ms\n",
      "Speed: 1.2ms preprocess, 38.6ms inference, 0.7ms postprocess per image at shape (1, 3, 640, 352)\n",
      "\n",
      "image 1/1 /home/avicii/Mathmatic/dl-ml/CV/datasets/Oracle/3_Test/Figures/020051.jpg: 640x544 7 oracles, 93.6ms\n",
      "Speed: 1.7ms preprocess, 93.6ms inference, 0.6ms postprocess per image at shape (1, 3, 640, 544)\n",
      "\n",
      "image 1/1 /home/avicii/Mathmatic/dl-ml/CV/datasets/Oracle/3_Test/Figures/020007.jpg: 640x480 17 oracles, 86.6ms\n",
      "Speed: 1.9ms preprocess, 86.6ms inference, 0.8ms postprocess per image at shape (1, 3, 640, 480)\n",
      "\n",
      "image 1/1 /home/avicii/Mathmatic/dl-ml/CV/datasets/Oracle/3_Test/Figures/020047.jpg: 640x544 7 oracles, 86.5ms\n",
      "Speed: 1.6ms preprocess, 86.5ms inference, 0.6ms postprocess per image at shape (1, 3, 640, 544)\n",
      "\n",
      "image 1/1 /home/avicii/Mathmatic/dl-ml/CV/datasets/Oracle/3_Test/Figures/020004.jpg: 640x544 5 oracles, 93.8ms\n",
      "Speed: 1.7ms preprocess, 93.8ms inference, 0.6ms postprocess per image at shape (1, 3, 640, 544)\n",
      "\n",
      "image 1/1 /home/avicii/Mathmatic/dl-ml/CV/datasets/Oracle/3_Test/Figures/020011.jpg: 640x608 4 oracles, 107.1ms\n",
      "Speed: 1.8ms preprocess, 107.1ms inference, 0.9ms postprocess per image at shape (1, 3, 640, 608)\n",
      "\n",
      "image 1/1 /home/avicii/Mathmatic/dl-ml/CV/datasets/Oracle/3_Test/Figures/w01791.jpg: 640x352 4 oracles, 57.3ms\n",
      "Speed: 1.3ms preprocess, 57.3ms inference, 0.5ms postprocess per image at shape (1, 3, 640, 352)\n",
      "\n",
      "image 1/1 /home/avicii/Mathmatic/dl-ml/CV/datasets/Oracle/3_Test/Figures/020068.jpg: 608x640 10 oracles, 90.0ms\n",
      "Speed: 1.9ms preprocess, 90.0ms inference, 1.4ms postprocess per image at shape (1, 3, 608, 640)\n",
      "\n",
      "image 1/1 /home/avicii/Mathmatic/dl-ml/CV/datasets/Oracle/3_Test/Figures/020130.jpg: 640x608 3 oracles, 103.1ms\n",
      "Speed: 2.2ms preprocess, 103.1ms inference, 2.7ms postprocess per image at shape (1, 3, 640, 608)\n",
      "\n",
      "image 1/1 /home/avicii/Mathmatic/dl-ml/CV/datasets/Oracle/3_Test/Figures/w01837.jpg: 640x512 11 oracles, 74.1ms\n",
      "Speed: 2.4ms preprocess, 74.1ms inference, 0.7ms postprocess per image at shape (1, 3, 640, 512)\n",
      "\n",
      "image 1/1 /home/avicii/Mathmatic/dl-ml/CV/datasets/Oracle/3_Test/Figures/w01836.jpg: 640x512 4 oracles, 92.8ms\n",
      "Speed: 1.6ms preprocess, 92.8ms inference, 0.7ms postprocess per image at shape (1, 3, 640, 512)\n",
      "\n",
      "image 1/1 /home/avicii/Mathmatic/dl-ml/CV/datasets/Oracle/3_Test/Figures/020053.jpg: 640x544 7 oracles, 73.0ms\n",
      "Speed: 1.8ms preprocess, 73.0ms inference, 0.6ms postprocess per image at shape (1, 3, 640, 544)\n",
      "\n",
      "image 1/1 /home/avicii/Mathmatic/dl-ml/CV/datasets/Oracle/3_Test/Figures/020070.jpg: 640x448 32 oracles, 89.4ms\n",
      "Speed: 1.5ms preprocess, 89.4ms inference, 0.7ms postprocess per image at shape (1, 3, 640, 448)\n",
      "\n",
      "image 1/1 /home/avicii/Mathmatic/dl-ml/CV/datasets/Oracle/3_Test/Figures/w01802.jpg: 640x448 9 oracles, 63.2ms\n",
      "Speed: 1.4ms preprocess, 63.2ms inference, 0.6ms postprocess per image at shape (1, 3, 640, 448)\n",
      "\n",
      "image 1/1 /home/avicii/Mathmatic/dl-ml/CV/datasets/Oracle/3_Test/Figures/w01790.jpg: 640x512 3 oracles, 51.1ms\n",
      "Speed: 1.5ms preprocess, 51.1ms inference, 0.5ms postprocess per image at shape (1, 3, 640, 512)\n",
      "\n",
      "image 1/1 /home/avicii/Mathmatic/dl-ml/CV/datasets/Oracle/3_Test/Figures/020078.jpg: 640x576 4 oracles, 100.6ms\n",
      "Speed: 1.6ms preprocess, 100.6ms inference, 1.3ms postprocess per image at shape (1, 3, 640, 576)\n",
      "\n",
      "image 1/1 /home/avicii/Mathmatic/dl-ml/CV/datasets/Oracle/3_Test/Figures/020027.jpg: 640x448 8 oracles, 46.7ms\n",
      "Speed: 2.0ms preprocess, 46.7ms inference, 0.6ms postprocess per image at shape (1, 3, 640, 448)\n",
      "\n",
      "image 1/1 /home/avicii/Mathmatic/dl-ml/CV/datasets/Oracle/3_Test/Figures/020117.jpg: 640x448 9 oracles, 62.9ms\n",
      "Speed: 1.7ms preprocess, 62.9ms inference, 0.6ms postprocess per image at shape (1, 3, 640, 448)\n",
      "\n",
      "image 1/1 /home/avicii/Mathmatic/dl-ml/CV/datasets/Oracle/3_Test/Figures/020029.jpg: 640x448 11 oracles, 81.2ms\n",
      "Speed: 1.4ms preprocess, 81.2ms inference, 0.7ms postprocess per image at shape (1, 3, 640, 448)\n",
      "\n",
      "image 1/1 /home/avicii/Mathmatic/dl-ml/CV/datasets/Oracle/3_Test/Figures/020036.jpg: 640x512 22 oracles, 67.5ms\n",
      "Speed: 1.9ms preprocess, 67.5ms inference, 0.6ms postprocess per image at shape (1, 3, 640, 512)\n",
      "\n",
      "image 1/1 /home/avicii/Mathmatic/dl-ml/CV/datasets/Oracle/3_Test/Figures/020092.jpg: 640x640 5 oracles, 110.9ms\n",
      "Speed: 2.1ms preprocess, 110.9ms inference, 0.9ms postprocess per image at shape (1, 3, 640, 640)\n",
      "\n",
      "image 1/1 /home/avicii/Mathmatic/dl-ml/CV/datasets/Oracle/3_Test/Figures/020090.jpg: 640x544 1 oracle, 66.4ms\n",
      "Speed: 1.7ms preprocess, 66.4ms inference, 0.8ms postprocess per image at shape (1, 3, 640, 544)\n",
      "\n",
      "image 1/1 /home/avicii/Mathmatic/dl-ml/CV/datasets/Oracle/3_Test/Figures/020071.jpg: 640x384 8 oracles, 74.5ms\n",
      "Speed: 1.5ms preprocess, 74.5ms inference, 0.5ms postprocess per image at shape (1, 3, 640, 384)\n",
      "\n",
      "image 1/1 /home/avicii/Mathmatic/dl-ml/CV/datasets/Oracle/3_Test/Figures/w01820.jpg: 640x512 4 oracles, 81.9ms\n",
      "Speed: 1.2ms preprocess, 81.9ms inference, 0.6ms postprocess per image at shape (1, 3, 640, 512)\n",
      "\n",
      "image 1/1 /home/avicii/Mathmatic/dl-ml/CV/datasets/Oracle/3_Test/Figures/020116.jpg: 640x416 8 oracles, 75.1ms\n",
      "Speed: 1.5ms preprocess, 75.1ms inference, 0.6ms postprocess per image at shape (1, 3, 640, 416)\n",
      "\n",
      "image 1/1 /home/avicii/Mathmatic/dl-ml/CV/datasets/Oracle/3_Test/Figures/020039.jpg: 640x416 19 oracles, 72.9ms\n",
      "Speed: 1.4ms preprocess, 72.9ms inference, 0.7ms postprocess per image at shape (1, 3, 640, 416)\n",
      "\n",
      "image 1/1 /home/avicii/Mathmatic/dl-ml/CV/datasets/Oracle/3_Test/Figures/020030.jpg: 640x608 12 oracles, 94.1ms\n",
      "Speed: 2.8ms preprocess, 94.1ms inference, 0.6ms postprocess per image at shape (1, 3, 640, 608)\n",
      "\n",
      "image 1/1 /home/avicii/Mathmatic/dl-ml/CV/datasets/Oracle/3_Test/Figures/020048.jpg: 640x512 5 oracles, 83.7ms\n",
      "Speed: 1.5ms preprocess, 83.7ms inference, 0.5ms postprocess per image at shape (1, 3, 640, 512)\n",
      "\n",
      "image 1/1 /home/avicii/Mathmatic/dl-ml/CV/datasets/Oracle/3_Test/Figures/020076.jpg: 640x576 8 oracles, 69.6ms\n",
      "Speed: 1.9ms preprocess, 69.6ms inference, 0.6ms postprocess per image at shape (1, 3, 640, 576)\n",
      "\n",
      "image 1/1 /home/avicii/Mathmatic/dl-ml/CV/datasets/Oracle/3_Test/Figures/020109.jpg: 640x576 3 oracles, 101.7ms\n",
      "Speed: 1.6ms preprocess, 101.7ms inference, 1.0ms postprocess per image at shape (1, 3, 640, 576)\n",
      "\n",
      "image 1/1 /home/avicii/Mathmatic/dl-ml/CV/datasets/Oracle/3_Test/Figures/w01826.jpg: 640x512 4 oracles, 77.1ms\n",
      "Speed: 3.0ms preprocess, 77.1ms inference, 1.0ms postprocess per image at shape (1, 3, 640, 512)\n",
      "\n",
      "image 1/1 /home/avicii/Mathmatic/dl-ml/CV/datasets/Oracle/3_Test/Figures/020087.jpg: 640x480 7 oracles, 96.6ms\n",
      "Speed: 2.1ms preprocess, 96.6ms inference, 0.5ms postprocess per image at shape (1, 3, 640, 480)\n",
      "\n",
      "image 1/1 /home/avicii/Mathmatic/dl-ml/CV/datasets/Oracle/3_Test/Figures/020006.jpg: 640x576 1 oracle, 68.6ms\n",
      "Speed: 1.9ms preprocess, 68.6ms inference, 3.0ms postprocess per image at shape (1, 3, 640, 576)\n",
      "\n",
      "image 1/1 /home/avicii/Mathmatic/dl-ml/CV/datasets/Oracle/3_Test/Figures/020089.jpg: 640x576 3 oracles, 99.2ms\n",
      "Speed: 2.5ms preprocess, 99.2ms inference, 0.7ms postprocess per image at shape (1, 3, 640, 576)\n",
      "\n",
      "image 1/1 /home/avicii/Mathmatic/dl-ml/CV/datasets/Oracle/3_Test/Figures/w01834.jpg: 640x480 3 oracles, 87.9ms\n",
      "Speed: 1.7ms preprocess, 87.9ms inference, 0.8ms postprocess per image at shape (1, 3, 640, 480)\n",
      "\n",
      "image 1/1 /home/avicii/Mathmatic/dl-ml/CV/datasets/Oracle/3_Test/Figures/020111.jpg: 640x352 7 oracles, 39.7ms\n",
      "Speed: 1.2ms preprocess, 39.7ms inference, 0.5ms postprocess per image at shape (1, 3, 640, 352)\n",
      "\n",
      "image 1/1 /home/avicii/Mathmatic/dl-ml/CV/datasets/Oracle/3_Test/Figures/020023.jpg: 640x544 20 oracles, 73.7ms\n",
      "Speed: 1.8ms preprocess, 73.7ms inference, 0.6ms postprocess per image at shape (1, 3, 640, 544)\n",
      "\n",
      "image 1/1 /home/avicii/Mathmatic/dl-ml/CV/datasets/Oracle/3_Test/Figures/020041.jpg: 640x608 3 oracles, 97.2ms\n",
      "Speed: 1.9ms preprocess, 97.2ms inference, 0.6ms postprocess per image at shape (1, 3, 640, 608)\n",
      "\n",
      "image 1/1 /home/avicii/Mathmatic/dl-ml/CV/datasets/Oracle/3_Test/Figures/w01813.jpg: 640x512 12 oracles, 73.4ms\n",
      "Speed: 1.5ms preprocess, 73.4ms inference, 0.5ms postprocess per image at shape (1, 3, 640, 512)\n",
      "\n",
      "image 1/1 /home/avicii/Mathmatic/dl-ml/CV/datasets/Oracle/3_Test/Figures/020044.jpg: 640x416 6 oracles, 61.7ms\n",
      "Speed: 1.3ms preprocess, 61.7ms inference, 0.5ms postprocess per image at shape (1, 3, 640, 416)\n",
      "\n",
      "image 1/1 /home/avicii/Mathmatic/dl-ml/CV/datasets/Oracle/3_Test/Figures/020061.jpg: 640x608 6 oracles, 79.6ms\n",
      "Speed: 1.9ms preprocess, 79.6ms inference, 0.5ms postprocess per image at shape (1, 3, 640, 608)\n",
      "\n",
      "image 1/1 /home/avicii/Mathmatic/dl-ml/CV/datasets/Oracle/3_Test/Figures/020119.jpg: 640x544 4 oracles, 92.3ms\n",
      "Speed: 1.4ms preprocess, 92.3ms inference, 0.6ms postprocess per image at shape (1, 3, 640, 544)\n",
      "\n",
      "image 1/1 /home/avicii/Mathmatic/dl-ml/CV/datasets/Oracle/3_Test/Figures/020096.jpg: 640x416 7 oracles, 65.0ms\n",
      "Speed: 1.3ms preprocess, 65.0ms inference, 0.5ms postprocess per image at shape (1, 3, 640, 416)\n"
     ]
    }
   ],
   "source": [
    "boxes, dicts = getBoxes(imgs)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 212,
   "id": "f3868578-cfc6-42a5-bdef-571d1bb12637",
   "metadata": {},
   "outputs": [],
   "source": [
    "import numpy as np"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 226,
   "id": "f2906a1d-2b3d-4ba1-9994-277c6feba7e2",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "'[230.3, 358.7, 256.0, 391.2, 1.0]'"
      ]
     },
     "execution_count": 226,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "','.join([str(i) for i in [[round(k, 1) for j in (dicts['020000.jpg'].tolist()) for k in j]]])"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 213,
   "id": "1516746c-37f9-4164-bb80-c9b3b4eb6b53",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "1      None\n",
       "2      None\n",
       "3      None\n",
       "4      None\n",
       "5      None\n",
       "       ... \n",
       "196    None\n",
       "197    None\n",
       "198    None\n",
       "199    None\n",
       "200    None\n",
       "Length: 200, dtype: object"
      ]
     },
     "execution_count": 213,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "def func(x):\n",
    "    x[2] = ','.join([str(i) for i in [[round(k, 1) for j in (dicts[x[1]].tolist()) for k in j]]])\n",
    "\n",
    "import pandas as pd\n",
    "\n",
    "res_csv = pd.read_excel('./datasets/Oracle/3_Test/Test_results.xlsx')\n",
    "\n",
    "res_csv[1:].apply(func, axis=1)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 216,
   "id": "98b829e8-4693-45f1-8dc1-3690c7b93346",
   "metadata": {},
   "outputs": [],
   "source": [
    "img_names = res_csv[1:]['图像名称']"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 217,
   "id": "e2534bca-5b97-40ba-8fe1-8c113ff6fe9a",
   "metadata": {},
   "outputs": [],
   "source": [
    "img_pos = res_csv[1:]['标记']"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 227,
   "id": "e1a4016d-cd1a-4cfd-9405-e5d421924eb9",
   "metadata": {
    "scrolled": true
   },
   "outputs": [
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "/tmp/ipykernel_420327/2855792546.py:2: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  img_pos.iloc[i] = ','.join([str(i) for i in [[round(k, 1) for j in (dicts[img_names.iloc[i]].tolist()) for k in j]]])\n"
     ]
    }
   ],
   "source": [
    "for i in range(len(img_names)):\n",
    "    img_pos.iloc[i] = ','.join([str(i) for i in [[round(k, 1) for j in (dicts[img_names.iloc[i]].tolist()) for k in j]]])"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 228,
   "id": "5374c635-e695-4b8f-a094-bec297d74b7f",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>Unnamed: 0</th>\n",
       "      <th>图像名称</th>\n",
       "      <th>标记</th>\n",
       "      <th>Unnamed: 2</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>0</td>\n",
       "      <td>w01906.jpg</td>\n",
       "      <td>[111.0, 197.0, 152.0, 257.0, 1.0], [108.0, 283...</td>\n",
       "      <td>示例（保留）</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>1</td>\n",
       "      <td>020000.jpg</td>\n",
       "      <td>[230.3, 358.7, 256.0, 391.2, 1.0]</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>2</td>\n",
       "      <td>020001.jpg</td>\n",
       "      <td>[223.3, 285.9, 262.5, 332.3, 1.0, 274.0, 273.1...</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>3</td>\n",
       "      <td>020002.jpg</td>\n",
       "      <td>[254.1, 187.9, 289.3, 213.7, 1.0]</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>4</td>\n",
       "      <td>020003.jpg</td>\n",
       "      <td>[168.9, 349.5, 229.4, 441.5, 1.0, 242.0, 359.4...</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>...</th>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>196</th>\n",
       "      <td>196</td>\n",
       "      <td>w01838.jpg</td>\n",
       "      <td>[127.8, 78.2, 155.7, 122.9, 1.0, 61.8, 139.5, ...</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>197</th>\n",
       "      <td>197</td>\n",
       "      <td>w01839.jpg</td>\n",
       "      <td>[122.1, 135.4, 162.2, 174.4, 1.0, 67.0, 149.5,...</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>198</th>\n",
       "      <td>198</td>\n",
       "      <td>w01840.jpg</td>\n",
       "      <td>[152.2, 101.9, 177.3, 134.4, 1.0, 155.4, 48.3,...</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>199</th>\n",
       "      <td>199</td>\n",
       "      <td>w01841.jpg</td>\n",
       "      <td>[176.0, 75.5, 208.6, 150.9, 1.0, 215.5, 29.0, ...</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>200</th>\n",
       "      <td>200</td>\n",
       "      <td>w01842.jpg</td>\n",
       "      <td>[90.4, 68.0, 118.5, 106.2, 1.0, 117.5, 121.3, ...</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "<p>201 rows × 4 columns</p>\n",
       "</div>"
      ],
      "text/plain": [
       "     Unnamed: 0        图像名称  \\\n",
       "0             0  w01906.jpg   \n",
       "1             1  020000.jpg   \n",
       "2             2  020001.jpg   \n",
       "3             3  020002.jpg   \n",
       "4             4  020003.jpg   \n",
       "..          ...         ...   \n",
       "196         196  w01838.jpg   \n",
       "197         197  w01839.jpg   \n",
       "198         198  w01840.jpg   \n",
       "199         199  w01841.jpg   \n",
       "200         200  w01842.jpg   \n",
       "\n",
       "                                                    标记 Unnamed: 2  \n",
       "0    [111.0, 197.0, 152.0, 257.0, 1.0], [108.0, 283...     示例（保留）  \n",
       "1                    [230.3, 358.7, 256.0, 391.2, 1.0]        NaN  \n",
       "2    [223.3, 285.9, 262.5, 332.3, 1.0, 274.0, 273.1...        NaN  \n",
       "3                    [254.1, 187.9, 289.3, 213.7, 1.0]        NaN  \n",
       "4    [168.9, 349.5, 229.4, 441.5, 1.0, 242.0, 359.4...        NaN  \n",
       "..                                                 ...        ...  \n",
       "196  [127.8, 78.2, 155.7, 122.9, 1.0, 61.8, 139.5, ...        NaN  \n",
       "197  [122.1, 135.4, 162.2, 174.4, 1.0, 67.0, 149.5,...        NaN  \n",
       "198  [152.2, 101.9, 177.3, 134.4, 1.0, 155.4, 48.3,...        NaN  \n",
       "199  [176.0, 75.5, 208.6, 150.9, 1.0, 215.5, 29.0, ...        NaN  \n",
       "200  [90.4, 68.0, 118.5, 106.2, 1.0, 117.5, 121.3, ...        NaN  \n",
       "\n",
       "[201 rows x 4 columns]"
      ]
     },
     "execution_count": 228,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "res_csv"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 230,
   "id": "5b771bc8-69f8-4fcd-8ec2-d4f5f3d4e140",
   "metadata": {},
   "outputs": [],
   "source": [
    "res_csv.to_excel('./datasets/Oracle/3_Test/Test_results.xlsx')"
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3 (ipykernel)",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.11.5"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 5
}
